﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _1._12._2015_TodoWebAPI.Data.Models
{
    public abstract class AuditObject
    {
        public DateTime DateCreated { get; set; }
        public DateTime DateUpdated { get; set; }

        [Required]
        public string CreatedUserId { get; set; }
        [ForeignKey("CreatedUserId")]
        public virtual ApplicationUser CreatedUser { get; set; }

        [Required]
        public string UpdatedUserId { get; set; }
        [ForeignKey("UpdatedUserId")]
        public virtual ApplicationUser UpdatedUser { get; set; }

        public bool IsDeleted { get; set; }
    }
}
